// 路由配置
const routes = [
  {
    path: '/',
    redirect: { name: 'scb-welcome' },
    component: () => import('../views/child.vue'),
    children: [
      {
        // 首页
        path: 'home',
        name: 'scb-home',
        component: () => import('../views/scb/home.vue'),
        meta: {
          title: 'scbHome',
        },
      },
      {
        // 欢迎页面
        path: 'welcome',
        name: 'scb-welcome',
        component: () => import('../views/scb/welcome.vue'),
        meta: {
          title: 'scbWelcome',
        },
      },
      {
        // 今日赛程页面
        path: 'schedule',
        name: 'scb-schedule',
        component: () => import('../views/scb/schedule.vue'),
      },
      {
        // 单项页面
        path: 'event',
        name: 'scb-event',
        component: () => import('../views/scb/event.vue'),
      },
      {
        // 奖牌页面
        path: 'medal',
        name: 'scb-medal',
        component: () => import('../views/scb/medal.vue'),
      },
      {
        // 裁判页面
        path: 'official',
        name: 'scb-official',
        component: () => import('../views/scb/official.vue'),
      },
      {
        // 抽签页面
        path: 'ballot',
        name: 'scb-ballot',
        component: () => import('../views/scb/ballot.vue'),
      },
      {
        // 验码结果页面
        path: 'inspection',
        name: 'scb-inspection',
        component: () => import('../views/scb/inspection.vue'),
      },
      {
        // 场地障碍
        path: 'jump',
        redirect: { name: 'scb-jump-control' },
        component: () => import('../views/child.vue'),
        children: [
          {
            // 控制页面
            path: 'control',
            name: 'scb-jump-control',
            component: () => import('../views/scb/jump/control.vue'),
          },
          {
            // 热身页面
            path: 'warmUp',
            name: 'scb-jump-warmUp',
            component: () => import('../views/scb/jump/warnUp.vue'),
          },
          {
            // 裁判列表页面
            path: 'official',
            name: 'scb-jump-official',
            component: () => import('../views/scb/jump/official.vue'),
          },
          {
            // 出场顺序页面（个人）
            path: 'order',
            name: 'scb-jump-order',
            component: () => import('../views/scb/jump/order.vue'),
          },
          {
            // 实时成绩页面（个人）
            path: 'score',
            name: 'scb-jump-score',
            component: () => import('../views/scb/jump/score.vue'),
          },
          {
            // 实时成绩页面2
            path: 'score2',
            name: 'scb-jump-score2',
            component: () => import('../views/scb/jump/score2.vue'),
          },
          // scb-jump-45
          {
            // 实时成绩页面2
            path: 'scb-jump-45',
            name: 'scb-jump-45',
            component: () => import('../views/scb/jump/scb-jump-45.vue'),
          },
          {
            // 实时成绩页面2
            path: 'scb-jump-90',
            name: 'scb-jump-90',
            component: () => import('../views/scb/jump/scb-jump-90.vue'),
          },
          {
            // 成绩列表页面（个人）
            path: 'result',
            name: 'scb-jump-result',
            component: () => import('../views/scb/jump/result.vue'),
          },
          {
            // 出场顺序页面（团体）
            path: 'orderTeam',
            name: 'scb-jump-order-team',
            component: () => import('../views/scb/jump/orderTeam.vue'),
          },
          {
            // 成绩列表页面（团体）
            path: 'resultTeam',
            name: 'scb-jump-result-team',
            component: () => import('../views/scb/jump/resultTeam.vue'),
          },
        ],
      },
      {
        // 盛装舞步
        path: 'dressage',
        redirect: { name: 'scb-dressage-control' },
        component: () => import('../views/child.vue'),
        children: [
          {
            // 控制页面
            path: 'control',
            name: 'scb-dressage-control',
            component: () => import('../views/scb/dressage/control.vue'),
          },
          {
            // 裁判列表页面
            path: 'official',
            name: 'scb-dressage-official',
            component: () => import('../views/scb/dressage/official.vue'),
          },
          {
            // 出场顺序页面（团体）
            path: 'orderTeam',
            name: 'scb-dressage-order-team',
            component: () => import('../views/scb/dressage/orderTeam.vue'),
          },
          {
            // 成绩列表页面（团体）
            path: 'resultTeam',
            name: 'scb-dressage-result-team',
            component: () => import('../views/scb/dressage/resultTeam.vue'),
          },
          {
            // 出场顺序页面（个人）
            path: 'order',
            name: 'scb-dressage-order',
            component: () => import('../views/scb/dressage/order.vue'),
          },
          {
            // 实时成绩1
            path: 'score1',
            name: 'scb-dressage-score1',
            component: () => import('../views/scb/dressage/score1.vue'),
          },
          {
            // 实时成绩2
            path: 'score2',
            name: 'scb-dressage-score2',
            component: () => import('../views/scb/dressage/score2.vue'),
          },
          {
            // 实时成绩3
            path: 'score3',
            name: 'scb-dressage-score3',
            component: () => import('../views/scb/dressage/score3.vue'),
          },
          {
            // 实时成绩4
            path: 'score4',
            name: 'scb-dressage-score4',
            component: () => import('../views/scb/dressage/score4.vue'),
          },
          {
            // 实时成绩5
            path: 'score5',
            name: 'scb-dressage-score5',
            component: () => import('../views/scb/dressage/score5.vue'),
          },
          {
            // 实时成绩4
            path: 'score6',
            name: 'scb-dressage-score6',
            component: () => import('../views/scb/dressage/score6.vue'),
          },
          {
            // 实时成绩7
            path: 'score7',
            name: 'scb-dressage-score7',
            component: () => import('../views/scb/dressage/score7.vue'),
          },
          {
            // 实时成绩8
            path: 'score8',
            name: 'scb-dressage-score8',
            component: () => import('../views/scb/dressage/score8.vue'),
          },
          {
            // 实时成绩9
            path: 'score9',
            name: 'scb-dressage-score9',
            component: () => import('../views/scb/dressage/score9.vue'),
          },
          {
            // 成绩列表页面（个人）
            path: 'result',
            name: 'scb-dressage-result',
            component: () => import('../views/scb/dressage/result.vue'),
          },
        ],
      },
      {
        // 三项赛
        path: 'event',
        redirect: { name: 'scb-event-control' },
        component: () => import('../views/child.vue'),
        children: [
          {
            // 控制页面
            path: 'control',
            name: 'scb-event-control',
            component: () => import('../views/scb/event/control.vue'),
          },
          {
            // 裁判列表页面
            path: 'official',
            name: 'scb-event-official',
            component: () => import('../views/scb/event/official.vue'),
          },
          {
            // 裁判列表页面（场地障碍）
            path: 'jumpOfficial',
            name: 'scb-event-jump-official',
            component: () => import('../views/scb/event/jumpOfficial.vue'),
          },
          {
            // 出场顺序页面（盛装舞步/越野团体）
            path: 'orderTeam',
            name: 'scb-event-order-team',
            component: () => import('../views/scb/event/orderTeam.vue'),
          },
          {
            // 出场顺序页面（盛装舞步/越野个人）
            path: 'order',
            name: 'scb-event-order',
            component: () => import('../views/scb/event/order.vue'),
          },
          {
            // 实时成绩1（盛装舞步）
            path: 'dressageScore1',
            name: 'scb-event-dressage-score1',
            component: () => import('../views/scb/event/dressageScore1.vue'),
          },
          {
            // 实时成绩2（盛装舞步）
            path: 'dressageScore2',
            name: 'scb-event-dressage-score2',
            component: () => import('../views/scb/event/dressageScore2.vue'),
          },
          {
            // 实时成绩3（盛装舞步）
            path: 'dressageScore3',
            name: 'scb-event-dressage-score3',
            component: () => import('../views/scb/event/dressageScore3.vue'),
          },
          {
            // 实时成绩4（盛装舞步）
            path: 'dressageScore4',
            name: 'scb-event-dressage-score4',
            component: () => import('../views/scb/event/dressageScore4.vue'),
          },
          {
            // 实时成绩5（盛装舞步）
            path: 'dressageScore5',
            name: 'scb-event-dressage-score5',
            component: () => import('../views/scb/event/dressageScore5.vue'),
          },
          {
            // 实时成绩6（盛装舞步）
            path: 'dressageScore6',
            name: 'scb-event-dressage-score6',
            component: () => import('../views/scb/event/dressageScore6.vue'),
          },
          {
            // 成绩列表页面（个人）
            path: 'dressageResult',
            name: 'scb-event-result',
            component: () => import('../views/scb/event/result.vue'),
          },
          {
            // 成绩列表页面（团体）
            path: 'dressageResultTeam',
            name: 'scb-event-result-team',
            component: () => import('../views/scb/event/resultTeam.vue'),
          },
          {
            // 实时成绩（越野）
            path: 'crossCountryScore',
            name: 'scb-cross-country-score',
            component: () => import('../views/scb/event/crossCountryScore.vue'),
          },
          {
            // 出场顺序页面（场地障碍团体）
            path: 'jumpOrderTeam',
            name: 'scb-event-jump-order-team',
            component: () => import('../views/scb/event/jumpOrderTeam.vue'),
          },
          {
            // 出场顺序页面（场地障碍个人）
            path: 'jumpOrder',
            name: 'scb-event-jump-order',
            component: () => import('../views/scb/event/jumpOrder.vue'),
          },
          {
            // 实时成绩页面（场地障碍）
            path: 'jumpScore',
            name: 'scb-event-jump-score',
            component: () => import('../views/scb/event/jumpScore.vue'),
          },
        ],
      },
      {
        // 现代五项
        path: 'pentathlon',
        redirect: { name: 'scb-pentathlon-control' },
        component: () => import('../views/child.vue'),
        children: [
          {
            // 控制页面
            path: 'control',
            name: 'scb-pentathlon-control',
            component: () => import('../views/scb/pentathlon/control.vue'),
          },
          {
            // 实时成绩页面
            path: 'score',
            name: 'scb-pentathlon-score',
            component: () => import('../views/scb/pentathlon/score.vue'),
          },
        ],
      },
    ],
  },
  {
    path: '/:catchAll(.*)',
    component: () => import('@/views/common/404.vue'),
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/login/login.vue'),
    meta: {
      title: 'Login',
      required: false,
    },
  },
]

export default routes
